<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('风险预警列表')" />
    <th:block th:include="include :: ztree-css" />
    <style type="text/css">
        .content li a {color:blue;}
        .content li a:hover {color:black;}
        .ouu{height:23px;BORDER-RIGHT: #003c74 1px solid;
            PADDING-RIGHT: 2px; BORDER-TOP: #003c74 1px solid;
            PADDING-LEFT: 2px; FONT-SIZE: 12px;
            BORDER-LEFT: #003c74 1px solid; CURSOR: hand; COLOR: black; PADDING-TOP: 2px; BORDER-BOTTOM: #003c74 1px solid;
        }
        .blue{
             font-size:14px;
             color:blue;
         }
        .rowclick{
            color: #0cff39;
        }
        .row {
            margin-top: 1px;
            margin-bottom: 1px;
        }
    </style>
</head>
<body class="gray-bg" style="overflow: hidden">
<!--
监控流水列表区域
-->
<div style="height:6%;">
    <div style="float: left;margin-left:5px;">
        <label class="btn btn-success">监督项列表</label>
    </div>
    <div style="float: left;border:1px solid;border-color: gray;font-size: 16px;">
        <span style="color: black;margin-left: 13px;">预警总数【<span style="color: red" id="totalNum">0</span>】</span>
        <span style="color: grey;">未监控【<span style="color: red" id="noRiskNum" >0</span>】</span>
        <span style="color: blue;margin-left: 13px;">正常【<span style="color: red" id="normalNum" >0</span>】</span>
        <span style="color: red">督办【<span style="color: red" id="errorNum">0</span>】</span>
    </div>
    <div id="auTypeDiv" style="float: left;margin-left:5px; color: #468847;font-size: large"></div>
    <div class="btn-group content" style="float:right;margin-right:15px;">
        <button type="button" class="btn btn-primary" data-toggle="dropdown">预警小助手</button>
        <button type="button" class="btn btn-primary dropdown-toggle"
                data-toggle="dropdown">
            <span class="caret"></span>
            <span class="sr-only">切换下拉菜单</span>
        </button>
        <ul class="dropdown-menu" role="menu">
            <li><a href="#" onclick="commonSearch('交易流水查询',ctx+'paea/paeaDsTrade')">交易流水查询</a></li>
            <li><a href="#" onclick="commonSearch('账号/卡号查询',ctx+'query/paeaDsLink')">账号/卡号查询</a></li>
            <li><a href="#" onclick="commonSearch('交易码查询',ctx+'para/paeaParaTxnCde')">交易码查询</a></li>
            <li><a href="#" onclick="writeLog();">监控日志</a></li>
            <li><a href="#" onclick="commonSearch('网点基本情况查询',ctx+'para/authorizer')">网点基本情况查询</a></li>
            <li><a href="#" onclick="commonSearch('汇率查询',ctx+'para/smActXrt')">汇率查询</a></li>
            <li><a href="#" onclick="commonSearch('对公客户信息',ctx+'query/paeaDsCusvd4')">对公客户信息</a></li>
            <li><a href="#" onclick="_querySignature()">有权人签字</a></li>
        </ul>
    </div>
</div>
<!-- 监控项区域 -->
<div style="width: 18%;height: 88%;border: 1px solid;border-color:gray;float:left;overflow-x:scroll;">
    <div style="border: 1px; font-size: smaller" th:each="paeaAuType : ${paeaAuTypes}">
        <!--<button class="btn btn-block btn-outline btn-primary" type="button" onclick="auTypeSelect(this.value)" th:value="${paeaAuType.code}+'-'+ ${paeaAuType.name}" >[[${paeaAuType.code}]].[[${paeaAuType.name}]]</button>-->
        <button th:id="${paeaAuType.code}" th:value="${paeaAuType.code}+'-'+ ${paeaAuType.name}" th:title="${paeaAuType.code}+'-'+ ${paeaAuType.name}" style="width:280px;height:30px; text-align: left;margin-bottom: 3px;" class="ouu" onclick="auTypeSelect(this)" >[[${paeaAuType.code}]].[[${paeaAuType.name}]]</button>
    </div>
</div>
<!-- 监控列表 -->
<div style="width: 80%;height: 88%;border: 1px solid;border-color: gray;float: left;;overflow-x:scroll;">
    <div style="width: 100%;height:100%;">
        <div th:include="oms/paeaRiskItem/paeaRiskItemForModel :: paeaRiskItemForModel"></div>
    </div>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: ztree-js" />
<script th:inline="javascript">
    var editFlag = [[${@permission.hasPermi('oms:paeaRiskItem:edit')}]];
    var removeFlag = [[${@permission.hasPermi('oms:paeaRiskItem:remove')}]];
    var paeaRiskItemStatus = [[${@dict.getType('paea_risk_item_status')}]];
    var prefix = ctx + "oms/paeaRiskItem";
    var paeaAuTypes = [[${paeaAuTypes}]];
    var impType = paeaAuTypes[0].code;
    $('#impType').val(impType);
    function auTypeSelect(obj){
        $("button").removeClass("blue");
        $(obj).addClass("blue");
        $('#auTypeDiv').text(obj.value);
        impType = $.common.split(obj.value,"-")[0];
        $('#impType').val(impType);
        auTypeSerch();
    }
    //初始化预警量
    function initRiskNum(){
        var paeaRiskItemNumModels = [[${paeaRiskItemNumModels}]];
        var totalNum = 0;
        $.each(paeaRiskItemNumModels, function (i, v) {
            if (v.status == 1) {
                $("#noRiskNum").text(v.countNum);
            }else if(v.status == 2){
                $("#normalNum").text(v.countNum);
            }else if(v.status == 3){
                $("#errorNum").text(v.countNum);
            }
        });
        totalNum = parseInt($("#noRiskNum").text())+parseInt($("#normalNum").text())+parseInt($("#errorNum").text())
        $("#totalNum").text(totalNum);
    }
    $(document).ready(function(){
        initRiskNum();
    });
    function setRiskNum(){
        var data = $('#formId').serialize();
        $.operate.post(prefix + "/getPaeaRiskItemNumModel",data,function (action) {
            var riskNumModels = JSON.parse(action.msg);
            var totalNum = 0;
            $("#totalNum").text("0");
            $("#noRiskNum").text("0");
            $("#normalNum").text("0");
            $("#errorNum").text("0");
            $.each(riskNumModels, function (i, v) {
                if (v.status == 1) {
                    $("#noRiskNum").text(v.countNum);
                }else if(v.status == 2){
                    $("#normalNum").text(v.countNum);
                }else if(v.status == 3){
                    $("#errorNum").text(v.countNum);
                }
            });
            totalNum = parseInt($("#noRiskNum").text())+parseInt($("#normalNum").text())+parseInt($("#errorNum").text())
            $("#totalNum").text(totalNum);
        });
    }
    //选择机构
    function selectDeptTree() {
        var treeId = $("#treeId").val();
        var deptId = $.common.isEmpty(treeId) ? "00038" : $("#treeId").val();
        var url = ctx + "system/dept/selectDeptTree/" + deptId;
        var options = {
            title: '选择部门',
            width: "380",
            url: url,
            callBack: doSubmit
        };
        $.modal.openOptions(options);
    }
    function doSubmit(index, layero){
        var tree = layero.find("iframe")[0].contentWindow.$._tree;
        if ($.tree.notAllowParents(tree)) {
            var body = layer.getChildFrame('body', index);
            $("#treeId").val(body.find('#treeId').val());
            layer.close(index);
        }
    }
    function auTypeSerch() {
        tableSerch('1');
    }
    function tableSerch(flag) {
        if(flag=='0'){
            if(!$.validate.form()){
                return;
            }
        }
        var data = {impType: impType};
        $.operate.post(prefix + "/getAuditFifldInfo", data, function (result) {
            if (result.code == web_status.SUCCESS) {
                var rt = result.msg;
                var auditFildInfos = JSON.parse(rt);
                //表头数组拼接
                var columns = [{
                    checkbox: true,
                    field : 'checkbox',
                    title:'选择',
                    formatter: function (value, row, index) {
                        if(row.status&&row.status=='3'){
                            return {disabled : true};
                        }
                    }
                }, {
                    field: 'id',
                    title: 'id',
                    visible: false
                }];
                var status = false;
                $.each(auditFildInfos, function (i, v) {
                    if(v.entityCode=='status'){
                        columns.push({
                            field: v.entityCode,
                            title: v.name,
                            align: 'center',
                            formatter: function(value, row, index) {
                                return $.table.selectDictLabel(paeaRiskItemStatus, value);
                            }
                        });
                        status = true;
                    }else{
                        columns.push({
                            field: v.entityCode,
                            title: v.name,
                            align: 'center'
                        });
                    }
                });
                if(!status){
                    columns.push({
                        field: 'status',
                        title: '状态',
                        align: 'center',
                        formatter: function(value, row, index) {
                            return $.table.selectDictLabel(paeaRiskItemStatus, value);
                        }
                    });
                }
                columns.push({
                    field : 'operateRow',
                    title: '操作',
                    align: 'center',
                    formatter: function (value, row, index) {
                        var actions = [];
                        if(row.vchNo&&row.vchNo!=null&&row.vchNo!=''){//查看流水详情
                            actions.push('<a class="btn btn-info btn-xs" href="javascript:void(0)" onclick="_viewTradeDetail(\'' + row.vchNo + '\',\'' + row.trDate + '\',\'' + row.brCode + '\',\'' + row.trTelr + '\')"><i class="fa"></i>流水详情</a> ');
                        }
                        if(row.status&&row.status=='3'){//已下发风险
                            actions.push('<a class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="viewErrDetail(\'' + row.errId + '\')"><i class="fa"></i>查看预警单</a> ');
                        }else if(row.status&&row.status=='2'){//确认正常
                            actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" ><i class="fa"></i>'+row.auOper+'-'+'确认正常</a> ');
                        }else if(row.status&&row.status=='1'){//未监督
                            actions.push('<a class="btn btn-info btn-xs" href="javascript:void(0)" onclick="doConfirm(\'' + row.id + '\',\'' + row.status + '\')"><i class="fa"></i>提交</a>');
                        }
                        if(row.status&&row.status!='3'){//未下发风险
                            actions.push('<a class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="showRiskAdd(\'' + row.id + '\')"><i class="fa"></i>创建差错</a> ');
                        }
                        return actions.join('');
                    }
                });
                var itemoptions = {
                    id:"bootstrap-table",
                    url: prefix + "/queryRisk",
                    createUrl: prefix + "/add",
                    updateUrl: prefix + "/edit/{id}",
                    removeUrl: prefix + "/remove",
                    exportUrl: prefix + "/export",
                    showExport: true,
                    modalName: "预警信息",
                    showPageGo: true,
                    pagination: true,
                    pageSize: 5,
                    pageList: [5, 10, 20],
                    onClickCell: _initChildTable,
                    onClickRow: _changeRowStyle,
                    onLoadSuccess: _onLoadSuccess,
                    columns: columns
                };
                $.table.destroy('bootstrap-table-detail');
                $.table.destroy('bootstrap-table');
                $.table.init(itemoptions);
                //更新预警量
                setRiskNum();
            } else if (result.code == web_status.WARNING) {
                $.modal.alertWarning(result.msg)
            } else {
                $.modal.alertError(result.msg);
            }
            $.modal.closeLoading();
        });
    }
    function _initChildTable(field,value,row,element){
        if(field!='checkbox'&&row.field!='operateRow'){
            initChildTable(row);
        }
    }
    function _changeRowStyle(row,element){
        $(".rowclick").removeClass("rowclick");
        $(element).addClass("rowclick");
    }
    function _onLoadSuccess(data){
        var data = $('#bootstrap-table').bootstrapTable('getData', true);
        if(data.length>0){
            initChildTable(data[0]);
        }
    }
    //子表table
    function initChildTable(parentRow) {
        var childTable = $("#bootstrap-table-detail");
        //获取表头
        var data = {impType:impType};
        if(parentRow!=null&&parentRow.impType!=null){
            data = {impType: parentRow.impType}
        }
        $.operate.post(prefix + "/getAuditDetailFifldInfo", data, function (result) {
            if (result.code == web_status.SUCCESS) {
                var rt = result.msg;
                var auditFildInfos = JSON.parse(rt);
                //表头数组拼接
                var columns = [{
                    radio: true
                }, {
                    field: 'id',
                    title: 'id',
                    visible: false
                }];
                $.each(auditFildInfos, function (i, v) {
                    columns.push({
                        field: v.entityCode,
                        title: v.name,
                        align: 'center'
                    });
                });
                columns.push({
                    title: '操作',
                    align: 'center',
                    formatter: function(value, row, index) {
                        var actions = [];
                        if(row.vchNo&&row.vchNo!=null&&row.vchNo!=''){//查看流水详情
                            actions.push('<a class="btn btn-info btn-xs" href="javascript:void(0)" onclick="_viewTradeDetail(\'' + row.vchNo + '\',\'' + row.trDate + '\',\'' + row.brCode + '\',\'' + row.trTelr + '\')"><i class="fa"></i>流水详情</a> ');
                        }
                        return actions.join('');
                    }
                });
                var queryParam = {relId:'',dataDate:'',impType:impType};
                if(parentRow!=null&&parentRow.impType!=null){
                    queryParam = {relId: parentRow.relId,dataDate:parentRow.dataDate,impType:parentRow.impType};
                }
                var detailoptions = {
                    id:"bootstrap-table-detail",
                    url: ctx + "oms/paeaRiskItem/queryPaeaRiskItemDetail",
                    modalName: "预警详情",
                    method: 'post',
                    cache: false,
                    sidePagination: "server",
                    contentType: "application/x-www-form-urlencoded",
                    showPageGo: true,
                    pagination: true,
                    pageNumber: 1,
                    pageSize: 5,
                    pageList: [5, 10, 20],
                    queryParams :queryParam,
                    rowStyle:detailRowStyle,//通过自定义函数设置行样式
                    columns: columns
                };
                $.table.destroy('bootstrap-table-detail');
                $(childTable).bootstrapTable(detailoptions);
            } else if (result.code == web_status.WARNING) {
                $.modal.alertWarning(result.msg)
            } else {
                $.modal.alertError(result.msg);
            }
            $.modal.closeLoading();
        });
    };
    //表格样式
    function detailRowStyle(row, index) {
        var style = {};
        style={css:{'color':'#0f2ded'}};
        return style;
    }
    /*function showRiskDetail(field,value,row){
        if(field!='operateRow'){
            alert("点击+查看预警详情");
        }
    }*/
    function checkAll(){
        $('#bootstrap-table').bootstrapTable('checkAll');
    }
    function uncheckAll(){
        $('#bootstrap-table').bootstrapTable('uncheckAll');//uncheckAll全部取消 checkInvert反选
    }
    //单笔下发差错
    function showRiskAdd(_riskId)
    {
        var riskId = _riskId;
        if(riskId==null){
            var ids = $.table.selectColumns("id");
            if(ids.length<1 || ids.length>1){
                alert("请选择一条数据");
                return;
            }else{
                ids = ids.join();
            }
            riskId = ids;
        }
        var data = {riskId:riskId};
        $.operate.post(prefix + "/getRegisteErrInfo", data, function (result) {
            if (result.code == web_status.SUCCESS) {
                var errinfo = result.msg;
                var infoArray = $.common.split(errinfo,"@");
                registerErrorPre(infoArray[0],infoArray[1],infoArray[2],infoArray[3],infoArray[4],infoArray[5],infoArray[6],infoArray[7],infoArray[8],infoArray[9]);
            } else if (result.code == web_status.WARNING){
                $.modal.alertWarning(result.msg);
            } else {
                $.modal.alertError(result.msg);
            }
            $.modal.closeLoading();
        });
    }
    //调用创建差错模板
    function registerErrorPre(errSource,vchFlag,manFlag,trDate,orgId,tellerId,vchNo,tradeId,auTypeId,auditItemId){
        //var url =  ctx  + 'er/paeaErErrorRegister/registerErrorPre?errSource='+errSource+'&vchFlag='+vchFlag+'&manFlag='+manFlag+'&trDate='+trDate+'&orgId='+orgId+'&tellerId='+tellerId+'&vchNo='+vchNo+'&tradeId='+tradeId+'&auTypeId='+auTypeId+'&auditItemId='+auditItemId;
        var url =  prefix  + '/registerPaeaErError?errSource='+errSource+'&vchFlag='+vchFlag+'&manFlag='+manFlag+'&trDate='+trDate+'&orgId='+orgId+'&tellerId='+tellerId+'&vchNo='+vchNo+'&tradeId='+tradeId+'&auTypeId='+auTypeId+'&auditItemId='+auditItemId;
        var returnValue = window.showModalDialog(url,"创建督办","dialogWidth=1024px; dialogHeight=750px; help=no;top=0; status=no; scroll=yes; resizable=no;");
        if(returnValue){
            upItemById(auditItemId);
        }
    }
    //更新预警信息
    function upItemById(id){
        var data = {itemId:id};
        $.operate.post(ctx + "oms/paeaRiskItem/registerErrorUpItem", data, function (result) {
            if (result.code == web_status.SUCCESS){
                var statusmsg = result.msg;
                var status = statusmsg.substring(0,1);
                var msg = statusmsg.substring(1);
                $.modal.alertSuccess(msg);
                if(status&&status=='1'){//更新预警量
                    $("#noRiskNum").text(parseInt($("#noRiskNum").text())-1);
                    $("#errorNum").text(parseInt($("#errorNum").text())+1);
                }else if(status&&status=='2'){
                    $("#normalNum").text(parseInt($("#normalNum").text())-1);
                    $("#errorNum").text(parseInt($("#errorNum").text())+1);
                }
            }else if (result.code == web_status.WARNING){
                $.modal.alertWarning(result.msg);
            }else {
                $.modal.alertError(result.msg);
            }
            $.modal.closeLoading();
            $.table.refresh();
        });
    }
    function riskAddBatch()
    {
        $('#auditSuggest').text("");
        var auTypeId="";
        var impTypes = $.table.selectColumns("impType");
        if(impTypes==''){
            auTypeId = $('#impType option:selected').val();
        }else{
            auTypeId = impTypes[0];
        }
        var errSource=[[${errorSource}]];
        var url = ctx+"er/paeaErPoint/pointTreeData/"+auTypeId+"/"+errSource;
        var options = {
            id: "paeaErPoint",
            url: url,
            check: { enable: true, nocheckInherit: true, chkboxType: { "Y": "ps", "N": "ps" } },
            expandLevel: 2
        };
        $.tree.init(options);
        $('#myModal').modal('show');
    }
    function riskAddBatchSubmit()
    {
        var url = prefix+"/addRiskBatch";
        var ids = $.table.selectColumns("id");
        var auditSuggest = $('#auditSuggest').text();
        var paeaErPoints = $.tree.getCheckedNodes();
        if(auditSuggest==''||auditSuggest.length<1){
            alert("请输入整改建议");
            return;
        }
        if(paeaErPoints==null||paeaErPoints==null||paeaErPoints.length<1){
            alert("请选择风险点");
            return;
        }
        if(ids==''){
            if(confirm("没有做出选择，将下发该查询条件下所有未处理的预警数据，是否确定下发？")){
                $('#myModal').modal('hide');
                var paeaRiskItemQuery = $("#formId").serialize();
                var data = $.extend(data,{auditSuggest:auditSuggest,paeaErPoints:paeaErPoints});
                $.operate.post(url,data,function (result) {
                    if (result.code == web_status.SUCCESS) {
                        $.modal.alertSuccess(result.msg);
                    }else if (result.code == web_status.WARNING) {
                        $.modal.alertWarning(result.msg)
                    } else {
                        $.modal.alertError(result.msg);
                    }
                    $.modal.closeLoading();
                    $.table.refresh();
                    //更新预警量
                    setRiskNum();
                });
            }
        }else{
            $('#myModal').modal('hide');
            ids = ids.join();
            var data = {ids:ids,auditSuggest:auditSuggest,paeaErPoints:paeaErPoints};
            $.operate.post(url,data,function (result) {
                if (result.code == web_status.SUCCESS) {
                    $.modal.alertSuccess(result.msg);
                }else if (result.code == web_status.WARNING) {
                    $.modal.alertWarning(result.msg)
                } else {
                    $.modal.alertError(result.msg);
                }
                $.modal.closeLoading();
                $.table.refresh();
                //更新预警量
                setRiskNum();
            });
        }
    }
    function doConfirm(id,status){
        var url = prefix+"/doConfirm";
        var data = {id:id};
        $.operate.post(url,data,function (result) {
            if (result.code == web_status.SUCCESS) {
                $.modal.alertSuccess(result.msg);
                if(status&&status==1){//更新预警量
                    $("#noRiskNum").text(parseInt($("#noRiskNum").text())-1);
                    $("#normalNum").text(parseInt($("#normalNum").text())+1);
                }
            }else if (result.code == web_status.WARNING) {
                $.modal.alertWarning(result.msg)
            } else {
                $.modal.alertError(result.msg);
            }
            $.modal.closeLoading();
            $.table.refresh();
        });
    }
    function doConfirmBatch(){
        var url = prefix+"/doConfirmBatch";
        var ids = $.table.selectColumns("id");
        if(ids==''){
            if(confirm("没有做出选择，将提交该查询条件下所有未处理的预警数据，是否确定提交？")){
                var data = $("#formId").serialize();
                $.operate.post(url,data,function (result) {
                    if (result.code == web_status.SUCCESS) {
                        $.modal.alertSuccess(result.msg);
                    }else if (result.code == web_status.WARNING) {
                        $.modal.alertWarning(result.msg)
                    } else {
                        $.modal.alertError(result.msg);
                    }
                    $.modal.closeLoading();
                    $.table.refresh();
                    //更新预警量
                    setRiskNum();
                });
            }
        }else{
            ids = ids.join();
            var data = {ids:ids};
            $.operate.post(url,data,function (result) {
                if (result.code == web_status.SUCCESS) {
                    $.modal.alertSuccess(result.msg);
                }else if (result.code == web_status.WARNING) {
                    $.modal.alertWarning(result.msg)
                } else {
                    $.modal.alertError(result.msg);
                }
                $.modal.closeLoading();
                $.table.refresh();
                //更新预警量
                setRiskNum();
            });
        }
    }
    function exportItem(){
        var url = prefix+"/exportItem";
        var data = $('#formId').serialize();
        $.operate.post(url,data,function (result) {
            if (result.code == web_status.SUCCESS) {
                window.location.href = ctx + "common/download?fileName=" + encodeURI(result.msg) + "&delete=" + true;
            }else if (result.code == web_status.WARNING) {
                $.modal.alertWarning(result.msg)
            } else {
                $.modal.alertError(result.msg);
            }
            $.modal.closeLoading();
        });
    }
    //查看流水明细信息
    function _viewTradeDetail(vchNo,trDate,brCode,trTelr){
        if(vchNo == "null" || vchNo == "" || trDate == "null" || trDate == null){
            return ;
        }
        //var url = ctx+"paea/paeaDsTrade?brCode="+brCode+"&trDate=" + trDate+"&vchNo=" +vchNo+"&trTelr="+trTelr;
        var url = prefix+"/paeaDsTrade?brCode="+brCode+"&trDate=" + trDate+"&vchNo=" +vchNo+"&trTelr="+trTelr;
        var returnValue = window.showModalDialog(url,"查看流水详细信息","dialogWidth=1024px; dialogHeight=750px; help=no;top=0; status=no; scroll=yes; resizable=no;");
    }
    function viewErrDetail(id){
        var url =  ctx  + 'er/paeaErErrorProcess/doProcessErrorPre?id='+id;
        var returnFlag = window.showModalDialog(url,"","dialogWidth=1024px; dialogHeight=800px; help=no; status=no; scroll=yes; resizable=no;");
    }
</script>
<!--监督小助手脚本-->
<script th:inline="javascript">

    function commonSearch(title,src){
        var returnValue = window.showModalDialog(src,title,"dialogWidth=950px; dialogHeight=550px; help=no; status=no; scroll=yes; resizable=no;");
    }
    function writeLog(){
        $.operate.post(ctx + "wt/auditDaylogQuery/doCheckDayLogExists","",function (result) {
            if (result.code == web_status.SUCCESS) {
                var rt = result.msg;
                var openUrl = "";
                if(rt == "false"){
                    openUrl = ctx + "wt/auditDaylogCreate/add";
                }
                else{
                    openUrl =  ctx + "wt/auditDaylogCreate/modify/{id}";
                    openUrl = openUrl.replace("{id}",rt);
                }
                commonSearch('监控日志',openUrl);
                //$.modal.openFull("监控日志",openUrl,850,650);
                //var returnValue = window.showModalDialog(openUrl,"","dialogWidth=950px; dialogHeight=550px; help=no; status=no; scroll=yes; resizable=no;");

            } else if (result.code == web_status.WARNING) {
                $.modal.alertWarning(result.msg)
            } else {
                $.modal.alertError(result.msg);
            }
            $.modal.closeLoading();
        });
    }
    function _querySignature(){
        var orgCode = document.all.brCode?document.all.brCode.value:"";
        if(orgCode==""){
            alert("预警列表中没有数据");
            return;
        }
        var url = "<%=Parameters.pathPrefix%>smSignature.do?method=query&orgCode="+orgCode;
        commonSearch('有权人签字',url);
    }
</script>
</body>
</html>